#ifndef DIRECTORY_H_
#define DIRECTORY_H_

#include <map>
#include <string>
#include <list>
#include "File.h"

namespace Lame3d
{
	class Directory
	{
		public:
			Directory(const std::string &rPath, const char** goodExtensions = NULL);
			Directory(const std::string &rPath, const std::list<std::string> &goodExtensions);
			~Directory();
			
			std::map<std::string, File*>::const_iterator FileIterator() const;
			std::map<std::string, File*>::const_iterator End() const;
			File& operator[](const std::string pName);
		
		protected:
			std::map<std::string, File*> files;
			std::string dPath;
			
			void buildMap(const std::list<std::string> &fList);
	};
}

#endif /*DIRECTORY_H_*/
